﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Coleotrack.Data.Maps
{
    public class ReleaseMap : ClassMap<Release>
    {
        public ReleaseMap()
        {
            Id(x => x.Id).GeneratedBy.Identity();

            Map(x => x.Name).Not.Nullable().Length(255).UniqueKey("IX_Name");
            Map(x => x.Due).Not.Nullable();

            References(x => x.Project).Not.Nullable().UniqueKey("IX_Name");
        }
    }
}
